﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Nav">

    <Style
        TargetType="local:NavigationMenuBand">
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="local:NavigationMenuBand">

                    <ItemsControl
                        x:Name="itemControl"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Stretch">

                        <ItemsControl.Template>

                            <ControlTemplate
                                TargetType="ItemsControl">

                                <ScrollViewer
                                    Padding="0"
                                    BorderThickness="0,0,0,0"
                                    VerticalScrollBarVisibility="Auto">
                                    <ItemsPresenter />
                                </ScrollViewer>
                                
                            </ControlTemplate>

                        </ItemsControl.Template>

                        <ItemsPanelTemplate>
                            <StackPanel
                                Orientation="Vertical" />
                        </ItemsPanelTemplate>

                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <local:NavigationMenuItem
                                    Margin="0,0,0,2"
                                    ></local:NavigationMenuItem>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>

                    </ItemsControl>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
